<!DOCTYPE html>
<html lang="zh"  xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8">
    <title>日志</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script>
    <style>

    </style>
</head>
<body>


日志
<div id="mylogo1"  >
    <textarea id="loginfo" rows="20" cols="80">

    </textarea>
</div>

日志
<div id="mylogo2"  >
    <textarea id="logError" rows="20" cols="80">

    </textarea>
</div>

<script>

    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
        return currentdate;
    }




    function log1(){
        var date=getNowFormatDate();
        $.post("/getLogInfo",{"name":"xxx_info_"+date+".0.log"},function(res){
            $('#loginfo').val(':'+res);
        });
    }
    function log2(){
        var date=getNowFormatDate();
        $.post("/getLogError",{"name":"xxx_error_"+date+".0.log"},function(res){
            $('#logError').val(':'+res);
        });
    }




    $(function () {

        log1();
        log2();


    });
    
</script>


</body>
</html>